<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <%@ taglib uri="http://meevle.com/web/tags/MeevleTag.tld" prefix="meevle" %>
    
   <jsp:useBean id="userDelegate" class="com.meevle.business.UserDelegate"/>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

<c:forEach var="cssFile" items="${cssFiles}">
		<link rel="stylesheet" type="text/css" href="${cssFile }" />
</c:forEach>

<c:forEach var="script" items="${scripts}">
	<script type="text/javascript" src="${script}"></script>
</c:forEach> 

<title>Meevle</title>
</head>
<body>
<div id="page-container">
	
	${blah}
	
		<div id="site-navigation" class="clearfix">
			${navigation}
			<!--<ul>
				<li class="current"><a href="Index.do">Home</a></li>
				<li><a href="Download.do">Download</a></li>
				<li><a href="Faq.do">FAQ</a></li>
				<li><a href="Register.do">Register</a></li>
				<li><a href="WhatIs.do">What is Meevle</a></li>
				<li><a href="Player.do">Player</a></li>
			</ul>-->	
				
		</div><!-- end page-navigation -->
		
		<div id="page-content" class="clearfix">
			
			<h1>Home</h1>
			
			<h2>Register for Meevle <span>(You don't need to register anymore in the client)</span></h2>
			<div class="inner-box clearfix">
			
			<c:choose>
				<c:when test="${param.username != null}">
					<p>Filled in username: ${param.username} </p>
					<meevle:checkAvailabilityUser object="${userDelegate}" username="${param.username}">
						<div id="register-confirm">
							<p>${availableMessage}</p>
						</div>
					</meevle:checkAvailabilityUser>
				</c:when>
			</c:choose>
			
			<p><b>Register now and do it here</b></p>
			<p>Register here so you don't have to do it anymore when using the client for the first time.</p>
			<p>What is the advantage of registering now?</p>
			
			<ul>
				<li>see the average scores for your sets as a whole and for the different slots of each set;</li>
				<li>comment on other peoples slots.</li>
			</ul>
				<div id="form-block">
					<form action="#" method="get">
						<label for="uname">Username</label>
						<input type="text" name="username" id="uname" class="short" />
			
						<input type="submit" class="submit" name="checkAvailability" value="Available?" />
			
						<label for="pass">Password</label>
						<input type="password" name="password" id="pass" class="short" />
				
						<input type="submit" name="register" class="submit" value="Register" />
						<input type="submit" class="submit reset" value="Reset form" />
					</form>
				</div>
			</div>	
		</div><!-- end page-content -->

		
		${footer}
		
	</div><!-- end page-container -->

</body>
</html>